// Copyright (C) 2024 Kumo inc.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

#include <krpc/rpc/builtin/builtin_mapping.h>

namespace krpc {

    const std::string BuiltinMapping::kVersionPath = "/builtin/version";

    const std::string BuiltinMapping::kVersionPathMapping = "/builtin/version => default_method";

    const std::string BuiltinMapping::kHealthPath = "/builtin/health";

    const std::string BuiltinMapping::kHealthPathMapping = "/builtin/health => default_method";

    const std::string BuiltinMapping::kSocketsPath = "/builtin/sockets";

    const std::string BuiltinMapping::kSocketsPathMapping = "/builtin/sockets => default_method, /builtin/sockets/* => default_method";

    const std::string BuiltinMapping::kKThreadsPath = "/builtin/kthreads";

    const std::string BuiltinMapping::kKThreadsPathMapping = "/builtin/kthreads => default_method, /builtin/kthreads/* => default_method";

    const std::string BuiltinMapping::kIdsPath = "/builtin/ids";

    const std::string BuiltinMapping::kIdsPathMapping = "/builtin/ids => default_method, /builtin/ids/* => default_method";

    const std::string BuiltinMapping::kProtobufsPath = "/builtin/protobufs";

    const std::string BuiltinMapping::kProtobufsPathMapping = "/builtin/protobufs => default_method, /builtin/protobufs/* => default_method";

    const std::string BuiltinMapping::kListPath = "/builtin/list";

    const std::string BuiltinMapping::kListPathMapping = "/builtin/list => default_method";

    const std::string BuiltinMapping::kThreadsPath = "/builtin/threads";

    const std::string BuiltinMapping::kThreadsPathMapping = "/builtin/threads => default_method";

    const std::string BuiltinMapping::kDirPath = "/builtin/dir";

    const std::string BuiltinMapping::kDirPathMapping = "/builtin/dir => default_method, /builtin/dir/* => default_method";

    const std::string BuiltinMapping::kMemoryPath = "/builtin/memory";

    const std::string BuiltinMapping::kMemoryPathMapping = "/builtin/memory => default_method";

    const std::string BuiltinMapping::kVlogPath = "/builtin/vlog";

    const std::string BuiltinMapping::kVlogPathMapping = "/builtin/vlog => default_method";

    const std::string BuiltinMapping::kStatusPath = "/builtin/status";

    const std::string BuiltinMapping::kStatusPathMapping = "/builtin/status => default_method, /builtin/status/* => default_method";

    const std::string BuiltinMapping::kConnectionsPath = "/builtin/connections";

    const std::string BuiltinMapping::kConnectionsPathMapping = "/builtin/connections => default_method";

    const std::string BuiltinMapping::kVarsPath = "/builtin/vars";

    const std::string BuiltinMapping::kVarsPathMapping = "/builtin/vars => default_method, /builtin/vars/* => default_method";

    const std::string BuiltinMapping::kFlagsPath = "/builtin/flags";

    const std::string BuiltinMapping::kFlagsPathMapping = "/builtin/flags => default_method, /builtin/flags/* => default_method";

    const std::string BuiltinMapping::kRpczPath = "/builtin/rpcz";

    const std::string BuiltinMapping::kRpczPathMapping =    "/builtin/rpcz => default_method,"
                                                            "/builtin/rpcz/enable => enable,"
                                                            "/builtin/rpcz/disable => disable,"
                                                            "/builtin/rpcz/stats => stats,"
                                                            "/builtin/rpcz/hex_log_id => hex_log_id,"
                                                            "/builtin/rpcz/dec_log_id => dec_log_id,";

    const std::string BuiltinMapping::kBadmethodPath = "/builtin/badmethod";

    const std::string BuiltinMapping::kBadmethodPathMapping = "/builtin/badmethod/no_method => no_method";

    const std::string BuiltinMapping::kPProfPath = "/builtin/badmethod";

    const std::string BuiltinMapping::kPProfPathMapping = "/builtin/pprof => profile,"
                                                            "/builtin/pprof/profile => profile,"
                                                            "/builtin/pprof/contention => contention,"
                                                            "/builtin/pprof/heap => heap,"
                                                            "/builtin/pprof/symbol => symbol,"
                                                            "/builtin/pprof/growth => growth,"
                                                            "/builtin/pprof/cmdline => cmdline,";

    const std::string BuiltinMapping::kHotsPotsPath = "/builtin/hotspots";

    const std::string BuiltinMapping::kHotsPotsPathMapping = "/builtin/hotspots => cpu,"
                                                            "/builtin/hotspots/cpu => cpu,"
                                                            "/builtin/hotspots/cpu_non_responsive => cpu_non_responsive,"
                                                            "/builtin/hotspots/heap => heap,"
                                                            "/builtin/hotspots/heap_non_responsive => heap_non_responsive,"
                                                            "/builtin/hotspots/growth => growth,"
                                                            "/builtin/hotspots/growth_non_responsive => growth_non_responsive,"
                                                            "/builtin/hotspots/contention => contention,"
                                                            "/builtin/hotspots/contention_non_responsive => contention_non_responsive,"
                                                            "/builtin/hotspots/iobuf => iobuf,"
                                                            "/builtin/hotspots/iobuf_non_responsive => iobuf_non_responsive";
    const std::string BuiltinMapping::kPrometheusPath = "/builtin/prometheus";

    const std::string BuiltinMapping::kPrometheusPathMapping = "/builtin/prometheus => default_method";

    const std::string BuiltinMapping::kBuiltinIndexPath = "/builtin/index";

    const std::string BuiltinMapping::kBuiltinIndexPathMapping = "/builtin/index => default_method, /builtin => default_method";
}  // namespace krpc
